#include "ExtractSearchData.h"
#include "SearchResTweetData.h"
#include <iostream>
#include <string>

ExtractSearchData::ExtractSearchData(void)
{
}

ExtractSearchData::~ExtractSearchData(void)
{
}

void ExtractSearchData::doExtractData(std::istream &is, std::ostream &os)
{
	SearchResTweetData res;
	res.setData(is);
	const unsigned long size = res.getResSize();
	for(unsigned long i = 0; i < size; ++i){
		os << res.getResTweetID(i) << '\t';
		os << res.getResTweetCreatedTime(i) << '\t';
		os << res.getResTweetFromUserID(i)  << '\t';
		os << res.getResTweetText(i)        << std::endl;
	}

}